﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace XNAGraffiti.ParticleSystems
{
    class PaintParticleSystem : ParticleSystem
    {
        public PaintParticleSystem(Game game, ContentManager content)
            : base(game, content, "PaintParticleEffect")
        { }


        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "bluepaint";

            settings.MaxParticles = 30000;

            settings.Duration = TimeSpan.FromSeconds(30);

            settings.DurationRandomness = 0;

            settings.MinHorizontalVelocity = 0;
            settings.MaxHorizontalVelocity = 0f;

            settings.MinVerticalVelocity = 0f;
            settings.MaxVerticalVelocity = 0f;

            settings.Gravity = new Vector3(0, 0f, 0);

            settings.MinColor = new Color(0, 0, 50, 40);
            settings.MaxColor = new Color(20, 20, 255, 255);
            settings.MinRotateSpeed = 0;
            settings.MaxRotateSpeed = 0;
            settings.EmitterVelocitySensitivity = 0;

            settings.MinStartSize = 5;
            settings.MaxStartSize = 5;

            settings.MinEndSize = 8;
            settings.MaxEndSize = 8;

            // Use additive blending.
            settings.SourceBlend = Blend.SourceAlpha;
            settings.DestinationBlend = Blend.One;
        }
    }
}
